package com.dp.dao;

import java.sql.SQLException;
import java.util.List;

import com.dp.pojo.ClassPO;
import com.dp.pojo.MobileCompany;
import com.dp.pojo.TerminalPO;

/**
 * 操作终端适配信息DAO
 * @author dingdaiyang
 *
 */
public interface TerminalDao {
	
	
	/**
	 * 添加终端信息
	 * @param terminalPO
	 * @throws SQLException
	 */
	void insertTerminalInfo(TerminalPO ter) throws SQLException ;

	/**
	 * 修改适配信息。
	 * @param ter
	 * @throws SQLException
	 */
	int updateTerminalInfo(TerminalPO ter) throws SQLException ;
	
	/**
	 * 删除适配信息。
	 * @param terminal_id
	 * @throws SQLException
	 */
	int deleteTerminalInfo(long terminal_id) throws SQLException ;
	
	TerminalPO getTerminal(long id) throws SQLException;
	
	public TerminalPO checkTerminal(String user_agent) throws SQLException ;
	public TerminalPO checkModel(String model) throws SQLException ;
	
	public List<TerminalPO> getTerminalList() throws SQLException;
	
	public List<TerminalPO> getTerminalList(TerminalPO ter) throws SQLException ;

	int getTerminalListCount(TerminalPO ter) throws SQLException ;

	
	
	/**
	 * 添加厂商信息。
	 * @param mobileCompPO
	 * @throws SQLException
	 */
	void insertMobileCompany(MobileCompany com)
			throws SQLException;

	/**
	 * 修改厂商信息。
	 * @param mobileCompPO
	 * @throws SQLException
	 */
	public int updateMobileCompany(MobileCompany com)
			throws SQLException ;

	/**
	 * 删除厂商信息。
	 * @param com_id
	 * @throws SQLException
	 */
	public int deleteMobileCompany(long com_id) throws SQLException ;
	
	MobileCompany getMCompany(long id) throws SQLException ;
	MobileCompany checkMCompany(MobileCompany com) throws SQLException ;
	
	List<MobileCompany> getMCompanysByArea(int area)throws SQLException ;
	
	List<MobileCompany> getCompanyList() throws SQLException ;
	List<TerminalPO> getTerminalsbycomid(long com_id) throws SQLException ;
	List<MobileCompany> getCompanyList(MobileCompany com) throws SQLException;

	int getCompanyListCount(MobileCompany com) throws SQLException ;
	
	/**
	 * 添加终端大类信息。
	 * @param ClassPO
	 * @throws SQLException
	 */
	void insertUaClass(ClassPO uaClass)
			throws SQLException ;

	/**
	 * 修改终端大类信息。
	 * @param ClassPO
	 * @throws SQLException
	 */
	int updateUaClass(ClassPO uaClass)
			throws SQLException ;

	/**
	 * 删除终端大类信息。
	 * @param ua_class_id
	 * @throws SQLException
	 */
	int deleteUaClass(long ua_class_id) throws SQLException;
	
	ClassPO getUaClass(long id) throws SQLException;
	
	ClassPO checkUaClass(String ua_class) throws SQLException ;
	
	ClassPO getUaClassbyname(String ua_class) throws SQLException ;
	List<ClassPO> getUaClassesByType(int type)throws SQLException ;
	
	List<ClassPO> getUaClassList() throws SQLException ;
	
	List<ClassPO> getUaClassList(ClassPO uaClass) throws SQLException ;

	int getUaClassListCount(ClassPO uaClass) throws SQLException ;

	List<TerminalPO> getTerminalListByShort(long com_id, String string) throws SQLException;
	
}
